Constructor Subtyping
نویسندگان
چکیده
Constructor subtyping is a form of subtyping in which an induc tive type is viewed as a subtype of another inductive type if has more constructors than As suggested in its potential uses include proof assistants and functional programming languages In this paper we introduce and study the properties of a simply typed calculus with record types and datatypes and which supports record sub typing and constructor subtyping In the rst part of the paper we show that the calculus is con uent and strongly normalizing In the second part of the paper we show that the calculus admits a well behaved theory of canonical inhabitants provided one adopts expansive extensionality rules including expansion surjective pairing and a suitable expansion rule for datatypes Finally in the third part of the paper we extend our calculus with unbounded recursion and show that con uence is preserved
منابع مشابه
Constructor Subtyping in the Calculus of Inductive Constructions
The Calculus of Inductive Constructions (CIC) is a powerful type system, featuring dependent types and inductive deenitions, that forms the basis of proof-assistant systems such as Coq and Lego. We extend CIC with constructor subtyping, a basic form of subtyping in which an inductive type is viewed as a subtype of another inductive type if has more elements than. It is shown that the calculus i...
متن کاملSubtyping Functional+Nonempty Record Types
Solving systems of subtype constraints (or subtype inequalities) is in the core of eecient type reconstruction in modern object-oriented languages with subtyping and inheritance, two problems known polynomial time equivalent. It is important to know how diierent combinations of type constructors innuence the complexity of the problem. We show the NP-hardness of the satissability problem for sub...
متن کاملRelating Church-Style and Curry-Style Subtyping
Type theories with higher-order subtyping or singleton types are examples of systems where computation rules for variables are affected by type information in the context. A complication for these systems is that bounds declared in the context do not interact well with the logical relation proof of completeness or termination. This paper proposes a natural modification to the type syntax for Fω...
متن کاملSubtyping for Object Type Constructors
Object type constructors have been introduced as an approach to adding container object types to a language with type inference. Useful subtyping for object type constructors requires a flexible subtype rule for type constructors that is not simply the pointwise extension of subtyping for types. At the same time, subtyping should avoid requiring run-time type checks, as in the Java subtype rule...
متن کاملOn Decidability of Nominal Subtyping with Variance
We investigate the algorithmics of subtyping in the presence of nominal inheritance and variance for generic types, as found in Java 5, Scala 2.0, and the .NET 2.0 Intermediate Language. We prove that the general problem is undecidable and characterize three different decidable fragments. From the latter, we conjecture that undecidability critically depends on the combination of three features ...
متن کامل